{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys\n",
    "import os\n",
    "from pathlib import Path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 获取当前文件所在的目录的父级目录，并添加到 sys.path\n",
    "current_dir = os.getcwd()\n",
    "parent_dir = os.path.dirname(current_dir)\n",
    "sys.path.append(parent_dir)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# 现在可以从上一级目录中导入模块\n",
    "from package.SysConfigManager import SysConfigManager\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "sysConfig = SysConfigManager(config_path = \"../config/sysconfig.json\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "D:\\AIClass\\chat2money\\config\\.qwen\n",
      "D:\\AIClass\\chat2money\\datasets\n",
      "D:\\AIClass\\chat2money\\datasets\\pdf\n",
      "D:\\AIClass\\chat2money\\chat2db\n"
     ]
    }
   ],
   "source": [
    "print(sysConfig.get_config_path(\"DASHSCOPE_API_KEY_FILE_PATH\"))\n",
    "print(sysConfig.get_config_path(\"DATASETS_DIR_PATH\"))\n",
    "print(sysConfig.get_config_path(\"DATASETS_PDF_FILE_PATH\"))\n",
    "print(sysConfig.get_config_path(\"CHROMADB_COLLECTION_NAME\"))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "chat2money",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
